/*--------------------------------------------------------------
 * File: demo11.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 计算字节大小
 * 计算int  float  double 和char 的字节大小
 * 使用 sizeof 操作符计算int, float, double 和 char四种变量字节大小
 * sizeof 是 C 语言的一种单目操作符，如C语言的其他操作符++、--等，它并不是函数
 * sizeof 操作符以字节形式给出了其操作数的存储大小
 * Version 0.1
 * Date 2021-11-22 
 * 
 * @copyright Copyright (c) 2021
 * 
----------------------------------------------------------------*/
#include "stdio.h"

int main(int argc, char const *argv[])
{
    int inttegerType;
    float floatType;
    double doubleType;
    char charType;
    long b;
    long long c;
    long double d;

    printf("Size of int: %ld bytes\n",sizeof(int));
    printf("Size of int: %ld bytes\n",sizeof(inttegerType));
    printf("Size of float: %ld bytes\n",sizeof(floatType));
    printf("Size of double: %ld bytes\n",sizeof(doubleType));
    printf("Size of char: %ld bytes\n",sizeof(charType));  

    printf("Size of long: %ld bytes\n",sizeof(b));
    printf("Size of long long: %ld bytes\n",sizeof(c));
    printf("Size of long double: %ld bytes\n",sizeof(d));

    return 0;
}
